using System;
using System.Collections.Generic;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

using EuphoricEngine3D;
using EuphoricEngine3D.Input;
using EuphoricEngine3D.Components;

namespace EuphoricEngine3D_Demo
{
    public class DemoGame : GameBase3D
    {
        #region Fields

        private GraphicsDeviceManager _graphics;

        #endregion

        #region Constructor

        public DemoGame()
            : base ("EuphoricEngine3D Demo v1.0", "Fonts\\ConsoleFont")
        {
            Graphics.PreferredBackBufferWidth = 800;
            Graphics.PreferredBackBufferHeight = 600;
            //Graphics.PreferredBackBufferWidth = 1440;
            //Graphics.PreferredBackBufferHeight = 900;
            //Graphics.IsFullScreen = true;
            Graphics.MinimumPixelShaderProfile = ShaderProfile.PS_2_0;
            Graphics.MinimumVertexShaderProfile = ShaderProfile.VS_2_0;
            //Graphics.ApplyChanges();
        }

        #endregion

        #region Content Management

        protected override void LoadContent()
        {
            base.LoadContent();

            // Create a new Camera
            FPSCamera camera = new FPSCamera();

            // Setup its position and target
            camera.Position = new Vector3(138.2664f, 37.25768f, 128.8698f);
            camera.RotateTranslate(new Vector3(-.1417831f * 2f, .4225208f * 2, 0), Vector3.Zero);

            // Add it to the service container
            Engine.Services.AddService(typeof(Camera), camera);

            MouseDevice mouse = new MouseDevice(Engine);
            KeyboardDevice keyboard = new KeyboardDevice();

            Engine.Services.AddService(typeof(MouseDevice), mouse);
            Engine.Services.AddService(typeof(KeyboardDevice), keyboard);
        }

        #endregion

        #region Update

        protected override void Update(GameTime gameTime)
        {
            base.Update(gameTime);
        }

        #endregion

        #region Draw

        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            //

            base.Draw(gameTime);
        }

        #endregion
    }
}
